import React from 'react'
import Nav from '../../component/Nav/Nav'
import { withRouter } from 'react-router-dom'

class Home extends React.Component {
    constructor() {
        super()
        this.state = {

        }
    }
    render() {
        let nowurl = this.props.location.pathname
        let navshow = []
        if (nowurl === '/Home/Order' || nowurl === '/Home/MyStore' || nowurl === '/Home/MyInfo' || nowurl === '/Home/GoodsZ') {
            navshow = <Nav />
        }
        return (
            /* html */
            <div>
                <div className='main-content'>{this.props.children}</div>
                {navshow}
            </div>
        )
    }
}

export default withRouter(Home)